package com.neusoft.databus.agent.pool.ptrest;

import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

import com.neusoft.databus.common.connection.PorttrafficConnection;
import com.neusoft.databus.common.pool.AbstractPoolFactory;

/**
 * description
 *
 * @author sunchf
 * @date 2019年4月2日 上午9:28:26
 */
@Component
public class PtrestFactory extends AbstractPoolFactory<PorttrafficConnection, RestTemplate> {

    @Override
    public RestTemplate create(PorttrafficConnection httpConnection) throws Exception {
        final RestTemplate tpl = new RestTemplate();
        return tpl;
    }

    @Override
    public void destroy(RestTemplate v) {
        v = null;
    }

}
